/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
package robocup.component.infotypes;

/**
 * This info is received by the coach, if he hears the say-messages of
 * a player.
 */
public class CoachPlayerSayInfo extends AuralInfo {

	/**
	 * The heared message.
	 */
	private String message;

	/**
	 * The senders tricot number (of the own team).
	 */
	private int playerNumber;

	/**
	 * Constructs an info-object for a heared message of another player
	 * 
	 * @param iCycle -
	 *            when was it heared
	 * @param iPlayerNumber -
	 *            from whom was it heared
	 * @param iMessage -
	 *            what was heared
	 */
	public CoachPlayerSayInfo(int iCycle, int iPlayerNumber, String iMessage) {
		super(iCycle);
		this.playerNumber = iPlayerNumber;
		this.message = iMessage;
	}

	/**
	 * @return Returns the Playernumber.
	 */
	public double getPlayerNumber() {
		return this.playerNumber;
	}

	/**
	 * @return Returns the message.
	 */
	public String getMessage() {
		return this.message;
	}

	/**
	 * @return Returns a readable string containing the infos conatined in this
	 * object.
	 */
	public String toString() {
		return ("PlayerMessage: " + this.playerNumber + ", " + this.message);
	}
}
